<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>控制面板</title>
    <style>
        body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Microsoft YaHei", sans-serif; margin: 0; padding: 16px; }
        .wrap { max-width: 600px; margin: 0 auto; }
        h1 { font-size: 18px; }
        .row { margin: 12px 0; display: flex; gap: 8px; }
        input, button { font-size: 16px; padding: 8px 12px; }
        input { flex: 1; }
    </style>
    <script>
        function callNumber() {
            const num = document.getElementById('num').value.trim();
            if (!num) return alert('请输入电话号码');
            try {
                if (window.Android && window.Android.makeCallFromWeb) {
                    window.Android.makeCallFromWeb(num);
                } else {
                    alert('原生接口不可用，请稍后重试');
                }
            } catch (e) {
                alert('调用失败: ' + e);
            }
        }
    </script>
    </head>
<body>
    <div class="wrap">
        <h1>本地控制面板</h1>
        <div class="row">
            <input id="num" placeholder="输入电话号码" />
            <button onclick="callNumber()">拨号</button>
        </div>
        <p>说明：实际功能由 App 内的 Socket 连接与电话权限逻辑完成。</p>
    </div>
</body>
</html>


